import QtQuick 2.0
import QtQuick.Controls 2.3
import QtQuick.Layouts 1.3
import QtCharts 2.3
import QtGraphicalEffects 1.12

Page{
    id:root
    title: "Custom"


    ChartView{
        id:chartView
        anchors.fill: parent
        backgroundColor: "transparent"
        theme: ChartView.ChartThemeDark
        antialiasing: true
        //animationOptions:ChartView.GridAxisAnimations
//        LineSeries {
//            id:myLine;
//            name: "LineSeries"
//            XYPoint { x: 0; y: 0 }
//            XYPoint { x: 1.1; y: 2.1 }
//            XYPoint { x: 1.9; y: 3.3 }
//            XYPoint { x: 2.1; y: 2.1 }
//            XYPoint { x: 9.9; y: 4.9 }
//            XYPoint { x: 3.4; y: 3.0 }
//            XYPoint { x: 4.1; y: 3.3 }
//        }

        BarSeries {
             id: mySeries
             axisX: BarCategoryAxis { categories: ["2007", "2008", "2009", "2010", "2011", "2012" ] }
             BarSet { label: "Bob"; values: [2, 2, 3, 4, 5, 6] }
             BarSet { label: "Susan"; values: [5, 1, 2, 4, 1, 7] }
             BarSet { label: "James"; values: [3, 5, 8, 13, 5, 8] }
         }

    }
    // 下面是对图表添加的图形效果
    Glow {
        id:glow
        anchors.fill: chartView
        radius: 8
        samples: 17
        color: "#87CEFA"
        source: chartView
    }
    ColorOverlay {
      anchors.fill: chartView
      source: chartView
      color: "#000000ea"
    }


}
